const baseUrl = "http://127.0.0.1:3000";
export function getUsersApi() {
  return new Promise((resolve, reject) => {
    const xhr = new XMLHttpRequest();
    xhr.open("GET", `${baseUrl}/users`);
    xhr.responseType = "json";
    xhr.onload = function () {
      resolve(xhr.response);
    };
    xhr.send();
  });
}
